class AreaEntity {
  String name;
  String id;
  List<AreaEntity> areaChildList;
  Map<String, AreaEntity> map = {};
  AreaEntity({this.name, this.id, this.areaChildList});

  AreaEntity.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    id = json['id'];
    if (json['areaChildList'] != null) {
      areaChildList = new List<AreaEntity>();
      json['areaChildList'].forEach((v) {
        areaChildList.add(new AreaEntity.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['id'] = this.id;
    if (this.areaChildList != null) {
      data['areaChildList'] =
          this.areaChildList.map((v) => v.toJson()).toList();
    }
    return data;
  }
}
